import { Home, ReqPage, ResPage } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 首页模块
 */
// 急救信息
export const firstAidInformation = (params?: any) => {
  return http.get<Home.FirstAidInformation>(PORT1 + `/home/firstAidInformation`, params, { loading: false });
};
// 告警信息
export const commonAlarm = (params?: ReqPage) => {
  return http.get<ResPage<any>>(PORT1 + `/home/commonAlarm`, params, { loading: false });
};
// 呼叫类型
export const callTypeTop5 = (params?: any) => {
  return http.get<any>(PORT1 + `/home/callTypeTop5`, params, { loading: false });
};
// 任务数量趋势
export const taskQuantityTrend = () => {
  return http.get<any>(PORT1 + `/home/taskQuantityTrend`, {}, { loading: false });
};
// 车辆信息
export const ambulanceList = (params: ReqPage) => {
  return http.get<ResPage<any>>(PORT1 + `/home/ambulanceList`, params, { loading: false });
};
// 任务类型
export const taskType = (params?: any) => {
  return http.get<any>(PORT1 + `/home/taskType`, params, { loading: false });
};
// MPDS分析统计
export const mpdsType = (params?: any) => {
  return http.get<any>(PORT1 + `/home/mpdsType`, params, { loading: false });
};
